package com.pai4j.remote.aigc;

import com.pai4j.common.bean.PAIResponseBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

@FeignClient(name = "pai4j-aigc-service", contextId = "PlantUmlClient")
public interface PlantUmlClient {

    /**
     * 生成PNG图片并上传到MinIO
     */
    @PostMapping(value = "/aigc-service/plantUml/png", produces = MediaType.APPLICATION_JSON_VALUE)
    PAIResponseBean<Map<String, Object>> generatePng(@RequestBody String plantUmlCode);



    /**
     * 生成SVG并上传到MinIO
     */
    @PostMapping(value = "/aigc-service/plantUml/svg", produces = MediaType.APPLICATION_JSON_VALUE)
    PAIResponseBean<Map<String, Object>> generateSvg(@RequestBody String plantUmlCode);


    /**
     * 生成ASCII文本
     */
    @PostMapping(value = "/aigc-service/plantUml/ascii", produces = MediaType.TEXT_PLAIN_VALUE)
    PAIResponseBean<String> generateAscii(@RequestBody String plantUmlCode);

}
